<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="{{ URL::asset('/') }}big/css/pagination.css"/>
<link rel="stylesheet" type="text/css" href="{{ URL::asset('/') }}big/css/style.css"/>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="{{ URL::asset('/') }}big/js/jquery.pagination.js"></script>
<script src="{{ URL::asset('/') }}big/js/echarts.js"></script>
<script src="{{ URL::asset('/') }}big/js/hubei.js"></script>
<style type="text/css">
	.tb_box>div { position:relative;z-index:6}
	.tk {height: 135px;width: 300px;background-color: rgba(0, 31, 78, 0.75);border: 1px solid #3398db;}
	.tk .tishi {color:#fff;padding: 10px 0 0 15px;font-size: 14px;}
	.tk .table {}
	.tk .table .close {padding: 5px 15px;background: none;border: 1px solid #82cefa;position: absolute;right: 10px;bottom: 10px;cursor: pointer;
						color: #fff;}
	.tk .table .close:hover {background: #4cebf7;}
	.tk .tk_tit {width: 290px;margin-top: -3px;}
	.paiming_color {
	    width: 32px !important;
	    height: 32px !important;
	    display: inline-block;
	    background: url(http://nb.yntosite.com/images/hui.png) no-repeat;
	    vertical-align: middle;
	    margin-right: 10px;
	}
	.paiming_color1 {
	    background: url(http://nb.yntosite.com/images/jin.png) no-repeat;
	}
	.paiming_color2 {
	    background: url(http://nb.yntosite.com/images/yin.png) no-repeat;
	}
	.paiming_color3 {
	    background: url(http://nb.yntosite.com/images/tong.png) no-repeat;
	}
	.box_8{
		top: 100px;
		right: 36px;
		height: 625px;
	}
	.mj_list{
		width: 80%;
		height: 90%;
		margin: 0 auto;
		margin-top: 10%;
	}
	.mj_list li{
		width: 100%;
		height: 38px;
		border: 1px solid #4ad1ff;
		border-bottom: none;
		cursor: pointer;
	}
	.mj_list .thead{
		cursor: default;
	}
	.mj_list li:last-child{
		border-bottom: 1px solid #4ad1ff;
	}
	.mj_list li span{
		display: inline-block;
		line-height: 38px;
		text-align: center;
		color: #fff;
		font-size: 18px;
		width: 32.5%;
	}
	.M-box{
		position: absolute;
		right: 10%;
	}
	.shul_table{
		width: 100%;
		border: 1px solid #4ad1ff;
		color:#fff;
		text-align: center;
	    border-collapse: collapse;
	}
	.new_shul{
		height: 100%;
	}
	.shul_table{
		height: 100%;
	}
	.shul_table tbody tr{
		cursor: pointer;
	}
	.shul_table thead {
		height: 35px;
	}
	.shul_table td,.shul_table th{
		border: 1px solid #4ad1ff;
		padding: 5px;
	}
	.shul_table td {
		/*background: rgba(135, 206, 250, .3);;*/
	}
	.box_3{
		width: 24%;
		left: 0.5%;
	}
	.box_4{
		width: 24%;
		left: 25.5%;
	}
	.box_5{
		width: 24%;
		left: 50.5%;
	}
	.box_6{
		width: 24%;
		left: 75.5%;
	}
	.box_8{
		right: 0.5%;
	}
	.main .map_box{
		width: 875px;
		left: 50%;
	}
	.message_box{
		height: 500px;
	    width: 800px;
	    background-color: rgba(0, 31, 78, 0.75);
	    border: 1px solid #3398db;
	    position: fixed;
	    margin: auto;
	    z-index: 1000;
	    top: 0px;
	    left: 0px;
	    right: 0px;
	    bottom: 0px;
	}
	.message_inner{
		color: #ffffff;
		width: 100%;
		height: 100%;
		overflow: hidden;
	}
	.scole{
		overflow-y: auto;
		height: 500px;
		width: 800px;
		padding-right: 20px;
	}
	.message_inner h2{
		width: 100%;
		text-align: center;
		font-size: 18px;
		line-height: 50px;
	}
	.tit{
		width: 96%;
    	margin-top: -3px;
    	height: 35px;
	    line-height: 35px;
	    color: #fff;
	    font-size: 18px;
	    background: url(../../big/images/box_tit.png) repeat;
	    position: relative;
	    padding-left: 4%;
	}
	.xx{
		font-size: 14px;
	    position: absolute;
	    right: 2px;
	    top: -2px;
	    cursor: pointer;
	    padding: 0 5px;
	    z-index: 9;
	}
	.table-form {
	    width: 96%;
	    border: 1px solid #fff;
	    margin: 0 auto;
	    border-collapse: collapse;
   		border-spacing: 0;
	}
	.table-form td{
		border: 1px solid #fff;
		padding: 8px 10px;
		font-size: 14px;
	}
	.mjbtn{
		position: absolute;
	    top: 40px;
	    left: 90px;
	    border-radius: 5px;
	    padding: 5px;
	    background: none;
	    border: 1px solid #63d0fd;
	    color: #fff;
	    cursor: pointer;
	    z-index: 99;
	}
</style>
</head>
<body>
	<div class="main">
		 <a href="http://nb.yntosite.com/admin/big/index" class="mjbtn">内保综合信息</a>
		 <div class="main_title">
		 	<h1>公安内保民警信息管理平台</h1>
		 	<div class="time_box">
				<p class="right_time" id="now_time">现在是：北京时间：<span id="hours">11:08:29</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="year">2017年8月11日</span>&nbsp;&nbsp;&nbsp;<span id="today">星期五</span></p>
			</div>
		 </div>
		 <div class="map_box" >
		 	<!--<h3>地图</h3>-->
		 	<button id="back">返回</button>
		 	<div id="allmap" style="width: 850px;height: 600px;"></div>
		 </div>
		 <div class="tb_box box_1">
		 	<h3>民警数量统计</h3>
		 	<div id="shul" style="height: 265px;"></div>
		 	<span class="kk1"></span>
		 	<span class="kk2"></span>
		 </div>
		  <div class="tb_box box_2">
		 	<h3>检查回馈数量统计</h3>
		 	<div id="jbshul" style="height: 265px;"></div>
		 	<span class="kk1"></span>
		 	<span class="kk2"></span>
		 </div>
		  <div class="tb_box tb_box3 box_3">
		 	<h3 style="width: 98%;">综合检查数统计</h3>
		 	<div id="xzshul" style="width: 100%; height: 265px;"></div>
		 </div>
		  <div class="tb_box tb_box2 box_4">
		 	<h3 style="width: 98%;">最新警情</h3>
		 	<div id="bwshul" style="width: 100%; height: 265px;">
		 		<div class="new_shul">
		 			<table class="shul_table shul_table_jq">
		 				<thead style="display: contents;">
		 					<th>标题</th>
		 					<th width="22%">时间</th>
		 					<th width="22%">处理</th>
		 				</thead>
		 				<tbody>
		 				</tbody>
		 			</table>
		 		</div>
		 	</div>
		 </div>
		  <div class="tb_box tb_box2 box_5">
		 	<h3 style="width: 98%;">最新人员核查</h3>
		 	<div id="zdbwshul" style="width: 100%; height: 265px;">
		 		<div class="new_shul">
		 			<table class="shul_table shul_table_ry">
		 				<thead style="display: contents;">
		 					<th>姓名</th>
		 					<th>时间</th>
		 					<th>处理</th>
		 				</thead>
		 				<tbody>
		 				</tbody>
		 			</table>
		 		</div>
		 	</div>
		 </div>
		   <div class="tb_box tb_box2 box_6">
		 	<h3 style="width: 98%;">最新线索</h3>
		 	<div id="zdwwshul" style="width: 100%; height: 265px;">
		 		<div class="new_shul">
		 			<table class="shul_table shul_table_xs">
		 				<thead style="display: contents;">
		 					<th>线索来源</th>
		 					<th>时间</th>
		 					<th width="100">处理</th>
		 				</thead>
		 				<tbody>
		 				</tbody>
		 			</table>
		 		</div>
		 	</div>
		 </div>
		  <!--<div class="tb_box tb_box3 box_7">
		 	<h3 style="width: 312px;">单位状态数量统计</h3>
		 	<div id="zdztshul" style="width: 320px; height: 265px;"></div>
		 </div>-->
		  <div class="tb_box box_8">
		 	<h3>民警综合排行</h3>
		 	<div id="hylbul" style="height: 530px;">
		 		<ul class="mj_list tongjitu_tb">
		 			<li class="thead">
		 				<span>名次</span>
		 				<span>姓名</span>
		 				<span>数量</span>
		 			</li>
		 		</ul>
		 		<!--<div class="M-box"></div>-->
		 	</div>
		 	<span class="kk1"></span>
		 	<span class="kk2"></span>
		 </div>
		   <!--<div class="tb_box box_9">
		 	<h3>行业管控系统数量统计</h3>
		 	<div id="huizong" style="height: 265px;"></div>
		 	<span class="kk1"></span>
		 	<span class="kk2"></span>
		 </div>-->
	</div>


<div class="modal" style="display: none;"></div>
<div class="tk" style="display: none;">
	<div class="tk_tit">
		<h3>提示</h3>
		<b class="tk_close" >x</b>
	</div>
	<div class="table">
		<p class='tishi'>没有数据!</p>
		<button class='close'>确定</button>
	</div>
</div>
<div class="message_box" style="display: none;">
	<div class="tit">
		<h3>民警信息</h3><b class="xx">x</b>
	</div>
	<div class="message_inner">
		<div class="scole">
			
		</div>
	</div>
</div>


</body>
</html>


<script type="text/javascript">
   		/*$('.M-box').pagination({
		    callback:function(api){
		        $('.now').text(api.getCurrent());
		    }
		},function(api){
		    $('.now').text(api.getCurrent());
		});
		$('.M-box2').pagination({
			pageCount:9,
		    coping:true,
		    homePage:'首页',
		    endPage:'末页',
		    prevContent:'上页',
		    nextContent:'下页'
		});*/
	// var allmap = echarts.init(document.getElementById('allmap'));
       $(function(){
	   		
	   		$(".tk_close").click(function(){
	   			popHide();
	   		});
	   		$(".close").click(function(){
	   			popHide();
	   		});
	   		function popHide(){
	   			$(".tk").hide();
	   			$(".modal").hide();
	   		}
        })
        //案件人员线索详情
        $(function(){
        	$(".xx").click(function(){
	   			$(".modal").hide();
	   			$(".message_box").hide();
	   		})
        	//警情处理详情
        	$(".shul_table_jq tbody").on("click","tr",function(){
        		var jid = $(this).attr("jid");
        		$.ajax({
        			type:"POST",
		    	 	url:"{{url('admin/bigapi/jqsb_detail')}}",
		    	 	async:true,
		    	 	data: {'id':jid, '_token':'{{csrf_token()}}'},
		    	    dateType: 'json',
		    	    success : function(data){
		    	    	var obj = jQuery.parseJSON(data)
//		    	    	console.log("案件人员线索详情");
//						console.log(obj);
						var dt = obj.re;
						$(".modal").show();
	   					$(".message_box").show();
						var jmessg1 = '<h2>警情上报</h2>'+
										'<table class="table-form table-border w mg-auto">'+
							                '<tbody>'+
							                    '<tr>'+
							                        '<td class="font-bd" width="12%">上报标题</td>'+
							                        '<td colspan="5">'+
							                        	'<p>'+dt.jqbt+'</p>'+
							                        '</td>'+
							                    '</tr>'+
							                    '<tr>'+
							                        '<td class="font-bd">上报时间</td>'+
							                        '<td>'+
														'<p>'+dt.sbsj+'</p>'+
							                        '</td>'+
							                        '<td class="font-bd">县市区、派出所</td>'+
							                        '<td colspan="3">'+
							                            '<p>'+dt.dizhi+'</p>'+
							                        '</td>'+
							                    '</tr>'+
							                        '<tr>'+
							                        '<td class="font-bd">上报单位</td>'+
							                        '<td colspan="5">'+
							                        	'<p>'+dt.cldw+'</p>'+
							                        '</td>'+
							                    '</tr>'+
							                     '<tr>'+
							                        '<td class="font-bd">上报人</td>'+
							                        '<td>'+
							                            '<p>'+dt.sbren+'</p>'+
							                        '</td>'+
							                        '<td class="font-bd">联系电话</td>'+
							                        '<td colspan="3">'+
							                            '<p>'+dt.lxfs+'</p>'+
							                        '</td>'+
							                    '</tr>'+
							                    '<tr>'+
							                        '<td class="font-bd">警情类型</td>'+
							                        '<td colspan="5">'+
														'<p>'+dt.jqlx+'</p>'+
							                        '</td>'+
							                    '</tr>'+
							                    '<tr>'+
							                        '<td class="font-bd">警情内容</td>'+
							                        '<td colspan="5">'+
							                        	'<p>'+dt.cont+'</p>'+
							                        '</td>'+
							                    '</tr>'+
							                '</tbody>'+
							            '</table>'+
							            '<h2>处置情况</h2>'+
							            '<table class="table-form table-border w mg-auto">'+
							                '<tbody>'+
							                    '<tr>'+
							                        '<td class="font-bd">处置时间</td>'+
							                        '<td>'+
							                            '<p>'+dt.czsj+'</p>'+
							                        '</td>'+
							                        '<td class="font-bd">县市区、派出所</td>'+
							                        '<td colspan="3">'+
							                            '<p>'+dt.cldz+'</p>'+
							                        '</td>'+
							                    '</tr>'+
							                    '<tr>'+
							                        '<td class="font-bd">处理单位</td>'+
							                        '<td colspan="5">'+
							                        	'<p>'+dt.cldw+'</p>'+
							                        '</td>'+
							                    '</tr>'+
							                    '<tr>'+
							                        '<td class="font-bd">处理人</td>'+
							                        '<td>'+
							                            '<p>'+dt.clry+'</p>'+
							                        '</td>'+
							                        '<td class="font-bd">联系电话</td>'+
							                        '<td colspan="3">'+
							                            '<p>'+dt.cldh+'</p>'+
							                        '</td>'+
							                    '</tr>'+
							                     '<tr>'+
							                        '<td class="font-bd">处置情况</td>'+
							                        '<td colspan="5">'+
							                        	'<p>'+dt.zlqk+'</p>'+
							                        '</td>'+
							                    '</tr>'+
							                '</tbody>'+
							            '</table>';
						var jmessg2 = '<h2>警情上报</h2>'+
										'<table class="table-form table-border w mg-auto">'+
							                '<tbody>'+
							                    '<tr>'+
							                        '<td class="font-bd" width="12%">上报标题</td>'+
							                        '<td colspan="5">'+
							                        	'<p>'+dt.jqbt+'</p>'+
							                        '</td>'+
							                    '</tr>'+
							                    '<tr>'+
							                        '<td class="font-bd">上报时间</td>'+
							                        '<td>'+
														'<p>'+dt.sbsj+'</p>'+
							                        '</td>'+
							                        '<td class="font-bd">县市区、派出所</td>'+
							                        '<td colspan="3">'+
							                            '<p>'+dt.dizhi+'</p>'+
							                        '</td>'+
							                    '</tr>'+
							                        '<tr>'+
							                        '<td class="font-bd">上报单位</td>'+
							                        '<td colspan="5">'+
							                        	'<p>'+dt.cldw+'</p>'+
							                        '</td>'+
							                    '</tr>'+
							                     '<tr>'+
							                        '<td class="font-bd">上报人</td>'+
							                        '<td>'+
							                            '<p>'+dt.sbren+'</p>'+
							                        '</td>'+
							                        '<td class="font-bd">联系电话</td>'+
							                        '<td colspan="3">'+
							                            '<p>'+dt.lxfs+'</p>'+
							                        '</td>'+
							                    '</tr>'+
							                    '<tr>'+
							                        '<td class="font-bd">警情类型</td>'+
							                        '<td colspan="5">'+
														'<p>'+dt.jqlx+'</p>'+
							                        '</td>'+
							                    '</tr>'+
							                    '<tr>'+
							                        '<td class="font-bd">警情内容</td>'+
							                        '<td colspan="5">'+
							                        	'<p>'+dt.cont+'</p>'+
							                        '</td>'+
							                    '</tr>'+
							                '</tbody>'+
							            '</table>';
							            if(dt.czsj != null){
							            	$(".message_inner .scole").html(jmessg1);
							            }else{
							            	$(".message_inner .scole").html(jmessg2);
							            }
							            ifnull();
		    	    }
        		});
        	})
        	
        	//人员核查详情
        	$(".shul_table_ry tbody").on("click","tr",function(){
        		var rid = $(this).attr("rid");
        		$.ajax({
        			type:"POST",
		    	 	url:"{{url('admin/bigapi/ryhc_detail')}}",
		    	 	async:true,
		    	 	data: {'id':rid, '_token':'{{csrf_token()}}'},
		    	    dateType: 'json',
		    	    success : function(data){
		    	    	var obj = jQuery.parseJSON(data)
		    	    	//console.log("人员核查详情");
						//console.log(obj);
						var dt = obj.re;
						$(".modal").show();
	   					$(".message_box").show();
						var rmessg1 = '<h2>单位人员核查上报</h2>'+
									'<table class="table-form table-border w mg-auto">'+
					                    '<tbody>'+
					                    '<tr>'+
					                        '<td class="font-bd">上报时间</td>'+
					                        '<td>'+
												'<p>'+dt.sbsj+'</p>'+
					                        '</td>'+
					                        '<td class="font-bd" rowspan="3" width="92">核查人照片</td>'+
					                        '<td rowspan="3" class="text-center" width="160"><div class="example  col-md-12 col-xs-12 ">'+
												'<img src="http://nb.yntosite.com/'+dt.ry_pic+'" class="img-rounded zoomify" alt="" width="80">'+
					                        '</div></td>'+
					                    '</tr>'+
					                    '<tr>'+
					                    	'<td class="font-bd">县市区、派出所</td>'+
					                        '<td>'+
					                            '<p>'+dt.dizhi+'</p>'+
					                        '</td>'+
					                    '</tr>'+
					                    '<tr>'+
					                        '<td class="font-bd">上报单位</td>'+
					                        '<td><p>'+dt.unit_name+'</p></td>'+
					                    '</tr>'+
					                    '<tr>'+
					                        '<td class="font-bd">核查人员姓名</td>'+
					                        '<td>'+
					                            '<p>'+dt.hcry+'</p>'+
					                        '</td>'+
					                        '<td class="font-bd">身份证号</td>'+
					                        '<td>'+
					                            '<p>'+dt.sfzh+'</p>'+
					                        '</td>'+
					                    '</tr>'+
					                    '<tr>'+
					                        '<td class="font-bd">上报人</td>'+
					                        '<td>'+
					                            '<p>'+dt.sbren+'</p>'+
					                        '</td>'+
					                        '<td class="font-bd">联系电话</td>'+
					                        '<td>'+
					                            '<p>'+dt.lxfs+'</p>'+
					                        '</td>'+
					                    '</tr>'+
					                    '</tbody>'+
					               ' </table>'+
					               '<h2>民警核查回复</h2>'+
					               '<table class="table-form table-border w mg-auto">'+
					                    '<tbody>'+
					
					                        '<tr>'+
					                       '<td class="font-bd">处理时间</td>'+
					                        '<td>'+
					                             ' <p>'+dt.clsj+'</p>'+
					                         '</td>'+
					                        ' <td class="font-bd">县市区、派出所</td>'+
					                         '<td colspan="3">'+
					                             '<p>sdas</p>'+
					                        ' </td>'+
					                    '</tr>'+
					                    '<tr>'+
					                        '<td class="font-bd">处理单位</td>'+
					                        '<td colspan="5"><p>'+dt.cldw+'</p></td>'+
					                    '</tr>'+
					
					                     '<tr>'+
					                       ' <td class="font-bd">经办人</td>'+
					                        '<td>'+
					                             '<p>'+dt.clry+'</p>'+
					                        '</td>'+
					                        '<td class="font-bd">联系电话</td>'+
					                        '<td colspan="3">'+
					                            '<p>'+dt.cldh+'</p>'+
					                        '</td>'+
					                    '</tr>'+
					                     '<tr>'+
					                        '<td class="font-bd">核查结果</td>'+
					                        '<td colspan="5"><p>'+dt.hcjg+'</p></td>'+
					                    '</tr>'+
					                    '</tbody>'+
					                '</table>';
						var rmessg2 = '<h2>单位人员核查上报</h2>'+
									'<table class="table-form table-border w mg-auto">'+
					                    '<tbody>'+
					                    '<tr>'+
					                        '<td class="font-bd">上报时间</td>'+
					                        '<td>'+
												'<p>'+dt.sbsj+'</p>'+
					                        '</td>'+
					                        '<td class="font-bd" rowspan="3" width="92">核查人照片</td>'+
					                        '<td rowspan="3" class="text-center" width="160"><div class="example  col-md-12 col-xs-12 ">'+
												'<img style="margin:0 auto;" src="http://nb.yntosite.com/'+dt.ry_pic+'" class="img-rounded zoomify" alt="" width="80">'+
					                        '</div></td>'+
					                    '</tr>'+
					                    '<tr>'+
					                    	'<td class="font-bd">县市区、派出所</td>'+
					                        '<td>'+
					                            '<p>'+dt.dizhi+'</p>'+
					                        '</td>'+
					                    '</tr>'+
					                    '<tr>'+
					                        '<td class="font-bd">上报单位</td>'+
					                        '<td><p>'+dt.unit_name+'</p></td>'+
					                    '</tr>'+
					                    '<tr>'+
					                        '<td class="font-bd">核查人员姓名</td>'+
					                        '<td>'+
					                            '<p>'+dt.hcry+'</p>'+
					                        '</td>'+
					                        '<td class="font-bd">身份证号</td>'+
					                        '<td>'+
					                            '<p>'+dt.sfzh+'</p>'+
					                        '</td>'+
					                    '</tr>'+
					                    '<tr>'+
					                        '<td class="font-bd">上报人</td>'+
					                        '<td>'+
					                            '<p>'+dt.sbren+'</p>'+
					                        '</td>'+
					                        '<td class="font-bd">联系电话</td>'+
					                        '<td>'+
					                            '<p>'+dt.lxfs+'</p>'+
					                        '</td>'+
					                    '</tr>'+
					                    '</tbody>'+
					               ' </table>';
							            if(dt.clsj != null){
							            	$(".message_inner .scole").html(rmessg1);
							            }else{
							            	$(".message_inner .scole").html(rmessg2);
							            }
							            ifnull();
		    	    }
        		});
        	})
        	//线索详情
        	$(".shul_table_xs tbody").on("click","tr",function(){
        		var xid = $(this).attr("xid");
        		$.ajax({
        			type:"POST",
		    	 	url:"{{url('admin/bigapi/xsjb_detail')}}",
		    	 	async:true,
		    	 	data: {'id':xid, '_token':'{{csrf_token()}}'},
		    	    dateType: 'json',
		    	    success : function(data){
		    	    	var obj = jQuery.parseJSON(data)
		    	    	//console.log("线索举报");
						//console.log(obj);
						var dt = obj.re;
						$(".modal").show();
	   					$(".message_box").show();
						var xmessg1 = '<h2>线索举报</h2>'+
									'<table class="table-form table-border w mg-auto">'+
					                    '<tbody>'+
					                    '<tr>'+
					                       ' <td class="font-bd" width="12%">单位名称</td>'+
					                        '<td colspan="5"><p>'+dt.unit_name+'</p></td>'+
					                    '</tr>'+
					                     '<tr>'+
					                        '<td class="font-bd">姓名</td>'+
					                        '<td>'+
					                            '<p>'+dt.jbr+'</p>'+
					                        '</td>'+
					                        '<td class="font-bd">联系电话</td>'+
					                        '<td>'+
					                            '<p>'+dt.lxdh+'</p>'+
					                        '</td>'+
					                    '</tr>'+
					                     '<tr>'+
					                         '<td class="font-bd">举报时间</td>'+
					                        ' <td>'+
					                            ' <p>'+dt.jbsj+'</p>'+
					                        '</td>'+
					                         '<td class="font-bd">举报对象</td>'+
					                          '<td>'+
					                            '<p>'+dt.jbdx+'</p>'+
					                         ' </td>'+
					                    '</tr>'+
					                     '<tr>'+
					                        '<td class="font-bd">内容</td>'+
					                        '<td colspan="5"><p>'+dt.jbnr+'</p></td>'+
					                    '</tr>'+
										'<tr>'+
					                    	'<td>照片</td>'+
					                    	'<td colspan="3">'+
                                             		'<div class="example  col-md-12 col-xs-12 "><img src="http://nb.yntosite.com/'+dt.jbwj+'" class="img-rounded zoomify" alt="" width="50"></div>'+
		                                     '</td>'+
					                    '</tr>'+
					                    '</tbody>'+
					                '</table>'+
					                '<h2>举报回复</h2>'+
					                '<table class="table-form table-border w mg-auto">'+
					                    '<tbody>'+
					                       ' <tr>'+
					                        '<td class="font-bd">处理时间</td>'+
					                        '<td>'+
					                             '<p>'+dt.clsj+'</p>'+	
					                        '</td>'+
					                        '<td class="font-bd">县市区、派出所</td>'+
					                        '<td colspan="3">'+
					                            '<p>'+dt.dizhi+'</p>'+
					                        '</td>'+
					                    '</tr>'+
					                    '<tr>'+
					                        '<td class="font-bd">处理单位</td>'+
					                        '<td colspan="5"><p>'+dt.cldw+'</p></td>'+
					                    '</tr>'+
					                     '<tr>'+
					                        '<td class="font-bd">经办人</td>'+
					                        '<td>'+
					                             '<p>'+dt.jbr+'</p>'+
					                        '</td>'+
					                        '<td class="font-bd">联系电话</td>'+
					                        '<td colspan="3">'+
					                            '<p>'+dt.lxdh+'</p>'+
					                        '</td>'+
					                    '</tr>'+
					                     '<tr>'+
					                        '<td class="font-bd">核查结果</td>'+
					                        '<td colspan="5"><p>'+dt.clqk+'</p></td>'+
					                    '</tr>'+
					                    '</tbody>'+
					                '</table>'
						var xmessg2 = '<h2>线索举报</h2>'+
									'<table class="table-form table-border w mg-auto">'+
					                    '<tbody>'+
					                    '<tr>'+
					                       ' <td class="font-bd" width="12%">单位名称</td>'+
					                        '<td colspan="5"><p>'+dt.unit_name+'</p></td>'+
					                    '</tr>'+
					                     '<tr>'+
					                        '<td class="font-bd">姓名</td>'+
					                        '<td>'+
					                            '<p>'+dt.jbr+'</p>'+
					                        '</td>'+
					                        '<td class="font-bd">联系电话</td>'+
					                        '<td>'+
					                            '<p>'+dt.lxdh+'</p>'+
					                        '</td>'+
					                    '</tr>'+
					                     '<tr>'+
					                         '<td class="font-bd">举报时间</td>'+
					                        ' <td>'+
					                            ' <p>'+dt.jbsj+'</p>'+
					                        '</td>'+
					                         '<td class="font-bd">举报对象</td>'+
					                          '<td>'+
					                            '<p>'+dt.jbdx+'</p>'+
					                         ' </td>'+
					                    '</tr>'+
					                     '<tr>'+
					                        '<td class="font-bd">内容</td>'+
					                        '<td colspan="5"><p>'+dt.jbnr+'</p></td>'+
					                    '</tr>'+
										'<tr>'+
					                    	'<td>照片</td>'+
					                    	'<td colspan="3">'+
                                             		'<div class="example  col-md-12 col-xs-12 "><img src="http://nb.yntosite.com/'+dt.jbwj+'" class="img-rounded zoomify" alt="" width="50"></div>'+
		                                     '</td>'+
					                    '</tr>'+
					                    '</tbody>'+
					                '</table>';
							            if(dt.clsj != null){
							            	$(".message_inner .scole").html(xmessg1);
							            }else{
							            	$(".message_inner .scole").html(xmessg2);
							            }
							            
							            ifnull();
		    	    }
        		});
        	})
        	
        	
        	function ifnull(){
	        		$("td").each(function(){
		            	if($(this).find('p').html() == 'null'){
		            		//console.log($(this).find('p').html());
		            		$(this).find('p').html('');
		            	}
		            })
        	}
        	
        	
        	
        	
        	
        	
        	
        	
        	
        	
        	
        	
        	
        	
        	
        	
        	
        	
        	
        })
   		
   		
   		
   		//时间
            $(function(){
            	
            setInterval(function() {

            var now_time = new Date();
                    var year = now_time.getFullYear();
                    var month = now_time.getMonth() + 1;
                    var dates = now_time.getDate();
                    var hours = now_time.getHours();
                    var minu = now_time.getMinutes();
                    var seco = now_time.getSeconds();
                    var today = now_time.getDay();
                    if (hours < 10){
            hours = '0' + hours;
            }
            if (minu < 10){
            minu = '0' + minu;
            }
            if (seco < 10){
            seco = '0' + seco;
            }
            if (today == 1){
            today = '星期一';
            } else if (today == 2){
            today = '星期二';
            } else if (today == 3){
            today = '星期三';
            } else if (today == 4){
            today = '星期四';
            } else if (today == 5){
            today = '星期五';
            } else if (today == 6){
            today = '星期六';
            } else if (today == 0){
            today = '星期日';
            }
            $('#hours').html(hours + ':' + minu + ':' + seco);
            $('#year').html(year + '年' + month + '月' + dates + '日');
            $('#today').html(today);
            }, 1000);
			})
   
   	$("#back").click(function(){
   			csh();
    	})
    	function csh(){
    		city_n = 0;
    		myChart.clear();
    		load_map_data('湖北省');
			dwshul('湖北省');
			jbshul_fn('湖北省');
			zdbwshul_fn('湖北省');
			bwshul_fn('湖北省');
			zdwwshul_fn('湖北省');
			zdztshul_fn("湖北省");
//			hylbul_fn("湖北省");
			xzshul_fn('湖北省');
//			huizong_fn('湖北省');
    	}

    // 全省地图数据
		var hubei_data = [
							{city:'湖北省', map_name:'HB', map:'{{ URL::asset("/") }}big/map_data/hubei.json'},
							{city:'武汉市', map_name:'WH', map:'{{ URL::asset("/") }}big/map_data/wuhan.json'},
							{city:'荆州市', map_name:'JZ', map:'{{ URL::asset("/") }}big/map_data/jingzhou.json'},
							{city:'恩施土家族苗族自治州', map_name:'ES', map:'{{ URL::asset("/") }}big/map_data/enshi.json'},
							{city:'鄂州市', map_name:'EZ', map:'{{ URL::asset("/") }}big/map_data/ezhou.json'},
							{city:'黄冈市', map_name:'HG', map:'{{ URL::asset("/") }}big/map_data/huanggang.json'},
							{city:'黄石市', map_name:'HS', map:'{{ URL::asset("/") }}big/map_data/huangshi.json'},
							{city:'荆门市', map_name:'JM', map:'{{ URL::asset("/") }}big/map_data/jingmen.json'},
							{city:'十堰市', map_name:'SY', map:'{{ URL::asset("/") }}big/map_data/shiyan.json'},
							{city:'随州市', map_name:'SZ', map:'{{ URL::asset("/") }}big/map_data/suizhou.json'},
							{city:'襄阳市', map_name:'XY', map:'{{ URL::asset("/") }}big/map_data/xiangyang.json'},
							{city:'咸宁市', map_name:'XN', map:'{{ URL::asset("/") }}big/map_data/xianning.json'},
							{city:'孝感市', map_name:'XG', map:'{{ URL::asset("/") }}big/map_data/xiaogan.json'},
							{city:'宜昌市', map_name:'YC', map:'{{ URL::asset("/") }}big/map_data/yichang.json'},
							{city:'神农架林区', map_name:'SNJ', map:'{{ URL::asset("/") }}big/map_data/shennongjia.json'},
							{city:'潜江市', map_name:'QJ', map:'{{ URL::asset("/") }}big/map_data/qianjiang.json'},
							{city:'天门市', map_name:'TM', map:'{{ URL::asset("/") }}big/map_data/tianmen.json'},
							{city:'仙桃市', map_name:'TM', map:'{{ URL::asset("/") }}big/map_data/xiantao.json'},
						];

		// 地图加载数据，默认未加载任何数据
		var map_load = [];

		// 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('allmap'));

		// 当前地图数据
		var uploadedDataURL = "{{ URL::asset('/') }}big/map_data/hubei.json";
		var city_n = 0;
		// 定义单击事件
		var shen = '';
		var shen1 = '';
		
		var zuojiaKaiguan = true;
		myChart.on('click', function (params) {
			city_n++;
//			console.log(params);
			load_map_data(params.name);
			
			
			function city2(){
				if(params.name == "恩施土家族苗族自治州"){
					params.name = "恩施州";
				}else 
				if(params.name == "神农架林区"){
					params.name = "神农架";
				}
			}
			if(city_n==1){
				city2();
				shen ="湖北省";
				shen1 = params.name;
				setTimeout(function(){
					shen = shen1;
				},1000)
			}else if(city_n>1){
				
				city2();
				if(params.name == ''){
					shen1 = '空';
					shen1 = params.name;
	   				$(".tk").show();
	   				$(".modal").show();
	   				return false;
					
				}else{
					shen1 = params.name;
				}
				
			}
			
			dwshul(shen,shen1);
			jbshul_fn(shen,shen1);
			zdbwshul_fn(shen,shen1);
			bwshul_fn(shen,shen1);
			zdwwshul_fn(shen,shen1);
			zdztshul_fn(shen,shen1);
//			hylbul_fn(shen,shen1);
			xzshul_fn(shen,shen1);
//			huizong_fn(shen,shen1);
//			console.log(shen,shen1)
			
//			xqTable();
//			var city = ["武汉市","十堰市","襄阳市","荆门市","孝感市","黄冈市","鄂州市","黄石市","咸宁市","荆州市","宜昌市","随州市","仙桃市","天门市","潜江市","神农架","恩施州"]
//			$.each(city, function() {
//				var n = 0;
//				if(this == params.name){}else{n++;};
//				if(n==city.length){
//					
//				}
//			});
			
			function xqTable(){
				$(".modal").show();
				$(".tk").show();
			}
		});
		
		// 找到地图数据
		function get_map_data(name){
//			console.log(name);
			for (i = 0; i < hubei_data.length; i++)
			{
				if (hubei_data[i].city == name)
				{
					return hubei_data[i];
				}
			}
		}
		
		// 加载地图数据
		function load_map_data(name)
		{
//			console.log(name);
			var cityname = '';
			cityname = name;
			var map = get_map_data(name);
			if (map == null){
//				console.log('no map data');
			} else {
				uploadedDataURL = map.map;
				if(cityname == "湖北省"){
					cityname = "1";
				}else if(cityname == "恩施土家族苗族自治州"){
					cityname = "恩施州";
				}else if(cityname == "神农架林区"){
					cityname = "神农架";
				}
				$.ajax({
					type:"POST",
					url:"{{url('admin/Earth/tjmj')}}",
					data: {'name':cityname, '_token':'{{csrf_token()}}'},
					async:true,
					success:function(data){
						var obj = jQuery.parseJSON(data)
//						console.log(obj);
						data_arr = obj.result;
//						console.log(data_arr);
						 for(var i = 0;i<data_arr.length;i++){
						 	 if(data_arr[i].name == "神农架"){
						 	 	data_arr[i].name = "神农架林区"
						 	 }else if(data_arr[i].name == "恩施州"){
						 	 	data_arr[i].name = "恩施土家族苗族自治州"
						 	 }
						 }	
						//console.log(data_arr);			
            		// data 为城市的数据
    				//data_arr = [{name: '武汉市', value: 20057.34}, {name: '荆州市', value: 15477.48}];
    				load_chart(map, data_arr);
					}
				});
			}
		}

		function load_chart(map){
			// 最好写入过滤的方法，不要重复加载地图
			$.getJSON(uploadedDataURL, function (geoJson) {

				myChart.hideLoading();

				echarts.registerMap(map.map_name, geoJson);

				myChart.setOption(option = {
					title: {
						text: map.city + '数据',
						textStyle:{
							color:'#fff'
						}
//						subtext: '内保企业数据',
//						sublink: 'http://nb.yntosite.com'
					},
					tooltip: {
						trigger: 'item',
						formatter:function(map){
							for(var k in map.data){
								if(k == 'value'){
									return  map.value;
								}
							}
							return 0;
						}
					},
					toolbox: {
						show: false,
						orient: 'vertical',
						left: 'right',
						top: 'center',
						feature: {
							dataView: {readOnly: false},
							restore: {},
							saveAsImage: {}
						}
					},
					visualMap: {
						min: 0,
						max: 100,
						text:['多','少'],
						textStyle: {
					        color: '#fff'
					    },
						realtime: false,
						calculable: true,
//						color: ['orangered','yellow','lightskyblue']
						color: ['red','#4ad1ff','lightskyblue']
					},
					series: [
						{
							zlevel: 1,
							name: map.city,
							type: 'map',
							mapType: map.map_name, // 自定义扩展图表类型
							roam: true,
							label:{
								normal:{
									textStyle:{color:"#fff"}//省份标签字体颜色
								}
							},
							itemStyle:{
								normal:{
									label:{show:true},
									borderColor: '#00bbec',//区域边框颜色
									areaColor:"transparent"//区域颜色
								},
								emphasis:{label:{show:true}}
							},
							data:data_arr
						}
					]
				});
			});
		}

		
		// 开始加载湖北地图
	
//	 	 load_map_data('湖北省');
		function morenCity(){
			$.ajax({
        	 	type:"POST",
        	 	url:"{{url('admin/bigapi/getmap')}}",
        	 	async:true,
        	 	data: {'_token':'{{csrf_token()}}'},
        	    dateType: 'json',
        	    success : function(data){
        	    	var obj = {};
        	        var obj = jQuery.parseJSON(data);
//					console.log(obj);   
					if(obj.city == 'no'){
						load_map_data('湖北省');
					}else{
						load_map_data(obj.city);    
					}
        	    }
        	 });
		}
		morenCity();
		
		
		dwshul('湖北省');
         function dwshul(name1,name2){
         	$.ajax({
        	 	type:"POST",
        	 	url:"{{url('admin/bigapi/getpolice')}}",
        	 	async:true,
        	 	data: {'name1':name1,'name2':name2, '_token':'{{csrf_token()}}'},
        	    dateType: 'json',
        	    success : function(data){
        	    	var obj = {};
        	        var obj = jQuery.parseJSON(data);
        	        tubiao1(obj.city);
//      	        console.log(obj)
        	        
        	    }
        	   
        	 });
         }
     
//民警数量统计
 var shul = echarts.init(document.getElementById('shul'));
 
 
 function tubiao1(datas){

 shul_option = {
    backgroundColor: 'transparent',

    title: {
//      text: 'Customized Pie',
        left: 'center',
        top: 20,
        textStyle: {
            color: '#ccc'
        }
    },
//	color:['red','yellow']
    tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
    },

//  visualMap: {
//      show: false,
//      min: 80,
//      max: 600,
//      inRange: {
//          colorLightness: [0, 1]
//      }
//  },
    series : [
        {
            name:'民警数量',
            type:'pie',
            radius : '70%',
            center: ['50%', '50%'],
            data:datas.sort(function (a, b) { return a.value - b.value; }),
//          roseType: 'radius',
            label: {
                normal: {
                    textStyle: {
                        color: '#ffffff'
                    }
                }
            },
            labelLine: {
                normal: {
                    lineStyle: {
                        color: 'rgba(255, 255, 255, 0.3)'
                    },
                    smooth: 0.2,
                    length: 10,
                    length2: 20
                }
            },
            color: ['#1b56ea','#f24949', '#4ddade'],
            itemStyle: {
                normal: {
                    color: '',
                    shadowBlur: 200,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
            },

            animationType: 'scale',
            animationEasing: 'elasticOut',
            animationDelay: function (idx) {
                return Math.random() * 200;
            }
        }
    ]
	}
 
// 使用刚指定的配置项和数据显示图表。
        shul.setOption(shul_option);	 
}
   
   
// 单位级别数量统计          
var jbshul = echarts.init(document.getElementById('jbshul'));
jbshul_fn("湖北省");
function jbshul_fn(name1,name2){
     	$.ajax({
    	 	type:"POST",
    	 	url:"{{url('admin/bigapi/getsltj')}}",
    	 	async:true,
    	 	data: {'name1':name1,'name2':name2, '_token':'{{csrf_token()}}'},
    	    dateType: 'json',
    	    success : function(data){
    	    	var obj = {};
    	        var obj = jQuery.parseJSON(data);
    	        //console.log("obj");
    	        //console.log(obj);
    	        if(obj.length == 0){
    	        	jbshul.clear();
    	        }else{
    	        	  tubiao2(obj);
    	        }
    	    }
    	   
    	 });
 }
    
  function tubiao2_jian(data){
  	var data1 = [];
	for(x in data){
		data1.push(x);
	}
  	return data1;
  }
   function tubiao2_jian1(data){
  	var data2 = [];
	for(x in data){
		data2.push(data[x]);
	}
  	return data2;
  }
// tubiao2();
 function tubiao2(data){
jbshul_option = {
    backgroundColor: 'transparent',
    title: {
        text: "",
        textStyle: {
            color: '#00FFFF',
            fontSize: 24
        }
    },
    legend: {
        top: 20,
        textStyle: {
            color: '#fff',
        },
        data: ['总数', '已处理']
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '10%',
        containLabel: true
    },
    tooltip: {
        show: "true",
        trigger: 'axis',
        axisPointer: { // 坐标轴指示器，坐标轴触发有效
            type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
        }
    },
    yAxis: {
        type: 'value',
        axisTick: {
            show: false
        },
        axisLine: {
            show: false,
            lineStyle: {
                color: '#fff',
            }
        },
        splitLine: {
            show: true,
            lineStyle: {
                color: '#aaa',
            }
        },
    },
    xAxis: [{
            type: 'category',
            axisTick: {
                show: false
            },
            axisLine: {
                show: true,
                lineStyle: {
                    color: '#fff',
                }
            },
            data: ['人员核查数', '案件回馈数', '线索回馈数']
        }, {
            type: 'category',
            axisLine: {
                show: false
            },
            axisTick: {
                show: false
            },
            axisLabel: {
                show: false
            },
            splitArea: {
                show: false
            },
            splitLine: {
                show: false
            },
            data: ['人员核查数', '案件回馈数', '线索回馈数']
        },

    ],
    series: [{
            name: '',
            type: 'bar',
            xAxisIndex: 1,

            itemStyle: {
                normal: {
                    show: true,
                    color: '#277ace',
                    barBorderRadius: 50,
                    borderWidth: 0,
                    borderColor: '#333',
                }
            },
            barWidth: '20%',
        }, {
            name: '',
            type: 'bar',
            xAxisIndex: 1,

            itemStyle: {
                normal: {
                    show: true,
                    color: '#277ace',
                    barBorderRadius: 50,
                    borderWidth: 0,
                    borderColor: '#333',
                }
            },
            barWidth: '20%',
            barGap: '100%',
        }, {
            name: '总数',
            type: 'bar',
            itemStyle: {
                normal: {
                    show: true,
                    color: '#00FFE6',
                    borderWidth: 0,
                    borderColor: '#333',
                }
            },
            label: {
                normal: {
                    show: true,
                    position: 'top',
                    textStyle: {
                        color: '#fff'
                    }
                }
            },
            barWidth: '20%',
            data: [data.ryhc.total, data.jqsb.total, data.xsjb.total]
        }, {
            name: '已处理',
            type: 'bar',
            barWidth: '20%',
            itemStyle: {
                normal: {
                    show: true,
                    color: '#3023AE',
                    borderWidth: 0,
                    borderColor: '#333',
                }
            },
            label: {
                normal: {
                    show: true,
                    position: 'top',
                    textStyle: {
                        color: '#fff'
                    }
                }
            },
            barGap: '100%',
            data: [data.ryhc.cl, data.jqsb.cl, data.xsjb.cl]
        }

    ]
};
// 使用刚指定的配置项和数据显示图表。
        jbshul.setOption(jbshul_option);	
 }


 
        
// 保安公司数量统计       
var xzshul = echarts.init(document.getElementById('xzshul'));

xzshul_fn('湖北省');
function xzshul_fn(name1,name2){
     	$.ajax({
    	 	type:"POST",
    	 	url:"{{url('admin/bigapi/getaqjctj')}}",
    	 	async:true,
    	 	data: {'name1':name1,'name2':name2, '_token':'{{csrf_token()}}'},
    	    dateType: 'json',
    	    success : function(data){
    	    	var obj = {};
    	        var obj = jQuery.parseJSON(data);
    	        //console.log("检查");
    	        //console.log(obj);
    	       
    	         if(obj.length == 0){
    	        	xzshul.clear();
    	        }else{
	        	     tubiao3(obj.aqjc);
    	        }
    	    }
    	   
    	 });
 }
  function tubiao3_jian(data){
  	var data1 = [];
  	for(var i = 0 ;i<data.length;i++){
  		for(x in data[i]){
			if(x == 'name'){
				data1.push(data[i].name);
			}
		}
  	}
	 return data1;
}
	
function tubiao3(data){
//option
xzshul_option = {
    title: {
        text: '',
        subtext: '',
        x: 'center',
        y: 'center',
        textStyle: {
            fontWeight: 'normal',
            fontSize: 22
        }
    },
    tooltip: {
        trigger: 'item',
        formatter: function(params, ticket, callback) {
            var res = params.seriesName;
            res += '<br/>' + params.name + ' : ' + params.percent;
            return res;
        }
    },
    legend: {
        orient: 'vertical',
        right: '0%',
        bottom: '0%',
        data: ['日常检查', '达标检查', '专项检查'],
        textStyle: {
            color: '#ffffff'
        },
        itemWidth: 20,
        itemHeight: 10
    },
    series: [{
        name: '',
        type: 'pie',
        selectedMode: 'single',
        radius: ['35%', '70%'],
        label: {
            normal: {
                position: 'inner',
                textStyle: {
                    color: '#fff',
                    fontSize: 12
                }
            }
        },
        labelLine: {
            normal: {
                show: false
            }
        },
        data: [{
            value: data.rc,
            name: '日常检查'
        }, {
            value: data.zx,
            name: '达标检查'
        }, {
            value: data.db,
            name: '专项检查'
        }]
    }]
};
// 使用刚指定的配置项和数据显示图表。
        xzshul.setOption(xzshul_option);
}


        //最新警情
//保卫人员数量统计
//var bwshul = echarts.init(document.getElementById('bwshul'));
bwshul_fn('湖北省');
function bwshul_fn(name1,name2){
     	$.ajax({
    	 	type:"POST",
    	 	url:"{{url('admin/bigapi/last_jqsb')}}",
    	 	async:true,
    	 	data: {'name1':name1,'name2':name2, '_token':'{{csrf_token()}}'},
    	    dateType: 'json',
    	    success : function(data){
    	    	var obj = {};
    	        var obj = jQuery.parseJSON(data);
    	        //console.log(obj);
//  	        tubiao4(obj);
 				$(".shul_table_jq tbody").html('');
				for(var i = 0;i<obj.re.length;i++){
					   var Tr = '<tr jid='+ obj.re[i].jq_id+'>'+
			 						'<td><p>'+obj.re[i].jqbt+'</p></td>'+
			 						'<td><p>'+obj.re[i].sbsj+'</p></td>'+
			 						'<td><p>'+obj.re[i].police_cl+'</p></td>'+
			 					'</tr>';
			 					//console.log(Tr);
					   $(".shul_table_jq tbody").append(Tr);
				}
    	    }
    	   
    	 });
 }
 function tubiao4_jian(data){
	var data1 = [];
	for(var i = 0;i<data.length;i++){
		data1.push(data[i].name);
	}
	return data1;
}
function tubiao4_jian1(data){
	var data2 = [];
	for(var i = 0;i<data.length;i++){
		data2.push(data[i].value);
	}
	return data2;
}
function tubiao4(data){
	bwshul_option = {
   
    tooltip : {
        trigger: 'axis',
        axisPointer: {
            type: 'cross',
            label: {
                backgroundColor: 'transparent'
            }
        }
    },
    legend: {
        data:['保卫人员数量'],
        textStyle:{    //图例文字的样式
	        color:'#fff',
	    }
    },
    toolbox: {
    	show:false,
        feature: {
            saveAsImage: {}
        }
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis : [
        {
            type : 'value',
            boundaryGap : false,
             axisLabel: {
                            show: true,
                            textStyle: {
                                color: '#fff'
                            }
                        }
        }
    ],
    yAxis : [
        {
            type : 'category',
            data : tubiao4_jian(data),
             axisLabel: {
                            show: true,
                            textStyle: {
                                color: '#fff'
                            }
                        }
        }
    ],
    series : [
        {
            name:'保卫人员数量',
            type:'line',
            stack: '总量',
            areaStyle: {normal: {}},
            data:tubiao4_jian1(data)
        },
       
      
       
    ]
};

// 使用刚指定的配置项和数据显示图表。
        bwshul.setOption(bwshul_option);
}

        //最新人员
//重点部位数量统计
//var zdbwshul = echarts.init(document.getElementById('zdbwshul'));
zdbwshul_fn('湖北省');
function zdbwshul_fn(name1,name2){
     	$.ajax({
    	 	type:"POST",
    	 	url:"{{url('admin/bigapi/last_ryhc')}}",
    	 	async:true,
    	 	data: {'name1':name1,'name2':name2, '_token':'{{csrf_token()}}'},
    	    dateType: 'json',
    	    success : function(data){
    	    	var obj = {};
    	        var obj = jQuery.parseJSON(data);
    	        //console.log(obj);
//  	        tubiao4(obj);
 				$(".shul_table_ry tbody").html('');
				for(var i = 0;i<obj.re.length;i++){
					   var Tr = '<tr rid='+obj.re[i].rysh_id+'>'+
			 						'<td>'+obj.re[i].hcry+'</td>'+
			 						'<td>'+obj.re[i].sbsj+'</td>'+
			 						'<td>'+obj.re[i].police_cl+'</td>'+
			 					'</tr>';
			 					//console.log(Tr);
					   $(".shul_table_ry tbody").append(Tr);
				}
    	    }
    	   
    	 });
 }
function tubiao5_jian(data){
	var data1 = [];
	for(var i = 0;i<data.length;i++){
		data1.push(data[i].name);
	}
	return data1;
}
function tubiao5_jian1(data){
	var data2 = [];
	for(var i = 0;i<data.length;i++){
		data2.push(data[i].value);
	}
	return data2;
}
function tubiao5(data){
	zdbwshul_option = {
    color: ['#3398DB'],
    tooltip : {
        trigger: 'axis',
        axisPointer : {            // 坐标轴指示器，坐标轴触发有效
            type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
        }
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis : [
        {
            type : 'category',
            data : tubiao5_jian(data),
            axisTick: {
                alignWithLabel: true,
            },
              axisLabel: {
                            show: true,
                            textStyle: {
                                color: '#fff'
                            }
                        }
        }
    ],
    yAxis : [
        {
            type : 'value',
	          axisLabel: {
	                        show: true,
	                        textStyle: {
	                            color: '#fff'
	                        }
	                   },
        }
    ],
    series : [
        {
            name:'重点部位数量',
            type:'bar',
            barWidth: '20%',
            data:tubiao5_jian1(data),
            itemStyle:{
                        normal:{
                            color:'#4cccee'
                        }
                    }
        }
    ]
};

// 使用刚指定的配置项和数据显示图表。
        zdbwshul.setOption(zdbwshul_option);
}

     //最新线索
//重点岗位人员数量统计
//var zdwwshul = echarts.init(document.getElementById('zdwwshul'));
zdwwshul_fn('湖北省');
function zdwwshul_fn(name1,name2){
     	$.ajax({
    	 	type:"POST",
    	 	url:"{{url('admin/bigapi/last_xsjb')}}",
    	 	async:true,
    	 	data: {'name1':name1,'name2':name2, '_token':'{{csrf_token()}}'},
    	    dateType: 'json',
    	    success : function(data){
    	    	var obj = {};
    	        var obj = jQuery.parseJSON(data);
    	        //console.log(obj);
//  	        tubiao4(obj);
 				$(".shul_table_xs tbody").html('');
				for(var i = 0;i<obj.re.length;i++){
					   var Tr = '<tr xid='+obj.re[i].xs_id+'>'+
			 						'<td>'+obj.re[i].unit_name+'</td>'+
			 						'<td>'+obj.re[i].jbsj+'</td>'+
			 						'<td>'+obj.re[i].police_cl+'</td>'+
			 					'</tr>';
			 					//console.log(Tr);
					   $(".shul_table_xs tbody").append(Tr);
				}
    	    }
    	   
    	 });
 }
 function tubiao6_jian(data){
	var data1 = [];
	for(var i = 0;i<data.length;i++){
		data1.push(data[i].name);
	}
	return data1;
}
function tubiao6_jian1(data){
	var data2 = [];
	for(var i = 0;i<data.length;i++){
		data2.push(data[i].value);
	}
	return data2;
}
function tubiao6(data){
	zdwwshul_option = {
    color: ['#3398DB'],
    tooltip : {
        trigger: 'axis',
        axisPointer : {            // 坐标轴指示器，坐标轴触发有效
            type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
        }
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis : [
        {
            type : 'category',
            data : tubiao6_jian(data),
            axisTick: {
                alignWithLabel: true
            },
              axisLabel: {
                            show: true,
                            textStyle: {
                                color: '#fff'
                            }
                        }
        }
    ],
    yAxis : [
        {
            type : 'value',
	          axisLabel: {
	                        show: true,
	                        textStyle: {
	                            color: '#fff'
	                        }
	                   },
        }
    ],
    series : [
        {
            name:'重点岗位人员数量',
            type:'bar',
            barWidth: '20%',
            data:tubiao6_jian1(data),
             itemStyle:{
                        normal:{
                            color:'#f65a24'
                        }
                    }
        }
    ]
};
// 使用刚指定的配置项和数据显示图表。
        zdwwshul.setOption(zdwwshul_option);
}


//单位状态数量统计
//var zdztshul = echarts.init(document.getElementById('zdztshul'));
zdztshul_fn("湖北省");
function zdztshul_fn(name1,name2){
     	$.ajax({
    	 	type:"POST",
    	 	url:"{{url('admin/bigapi/policeph')}}",
    	 	async:true,
    	 	data: {'name1':name1,'name2':name2, '_token':'{{csrf_token()}}'},
    	    dateType: 'json',
    	    success : function(data){
    	    	var obj = {};
    	        var obj = jQuery.parseJSON(data);
    	        console.log("民警排行")
    	        console.log(obj)
    	        var daTa = obj.city;
	            if(daTa.length == 0){
    				 $(".tongjitu_tb .thead").nextAll().remove();
    	        	 var inner_data = '<li>'+
										 '<span>暂无数据</span>'+
									 '</li>'
						      	  $(".tongjitu_tb li").eq(-1).after(inner_data);		
		      	  }else{
		      	  		 $(".tongjitu_tb .thead").nextAll().remove();
		      	  		 for(var i =0;i<daTa.length;i++){
        	 	 			 console.log(daTa[i].rank)
        	 	 	 		var inner_data = '<li pid='+daTa[i].user_id+'>'+
											 '<span><span class="paiming_color paiming_color'+daTa[i].rank+'"></span>'+
											 	  '<strong class="paiming_font">第'+daTa[i].rank+'名</strong></span>'+
											
											 '<span>'+daTa[i].name+'</span>'+
											 '<span>'+daTa[i].count+'</span>'+
									 	'</li>'
						 	 $(".tongjitu_tb li").eq(-1).after(inner_data);			 
        	 	 		
        				 }
		      	  }
    	    }
    	   
    	 });
 }
 
 //民警信息
 $(".tongjitu_tb").on('click','li',function(){
 	console.log($(this).attr('pid'))
 	var pid = $(this).attr('pid');
 	if($(this).attr('pid') == undefined){
 		
 	}else{
 		$.ajax({
    	 	type:"POST",
    	 	url:"{{url('admin/bigapi/policexq')}}",
    	 	async:true,
    	 	data: {'id':pid, '_token':'{{csrf_token()}}'},
    	    dateType: 'json',
    	    success : function(data){
    	    	var obj = {};
    	        var obj = jQuery.parseJSON(data);
    	        console.log("民警信息")
    	        console.log(obj)
    	        var pldt = obj.re;
		 		$(".modal").show();
				$(".message_box").show();
				var police_msg = '<h2>民警信息</h2>'+
								'<table class="table-form table-border w mg-auto">'+
					                '<tbody>'+
					                    '<tr>'+
					                        '<td class="font-bd">姓名</td>'+
					                        '<td>'+
					                            '<p>'+pldt.user.name+'</p>'+
					                        '</td>'+
					                        '<td class="font-bd">性别</td>'+
					                        '<td colspan="3">'+
					                            '<p>'+pldt.sex+'</p>'+
					                        '</td>'+
					                    '</tr>'+
					                    '<tr>'+
					                        '<td class="font-bd">联系方式</td>'+
					                        '<td>'+
					                            '<p>'+pldt.user.phone+'</p>'+
					                        '</td>'+
					                        '<td class="font-bd">所属地区</td>'+
					                        '<td colspan="3">'+
					                            '<p>'+pldt.city.name+''+pldt.area.name+''+pldt.org.name+''+'</p>'+
					                        '</td>'+
					                    '</tr>'+
					                    '<tr>'+
					                        '<td>警情上报</td>'+
					                        '<td colspan="2">'+
					                            '<p>已处理&nbsp;&nbsp;'+pldt.yejq+'</p>'+
					                        '</td>'+
					                        '<td colspan="2">'+
					                            '<p>未处理&nbsp;&nbsp;'+pldt.nojq+'</p>'+
					                        '</td>'+
					                    '</tr>'+
					                    '<tr>'+
					                        '<td>人员核查</td>'+
					                        '<td colspan="2">'+
					                            '<p>已处理&nbsp;&nbsp;'+pldt.yery+'</p>'+
					                        '</td>'+
					                        '<td colspan="2">'+
					                            '<p>未处理&nbsp;&nbsp;'+pldt.nory+'</p>'+
					                        '</td>'+
					                    '</tr>'+
					                    '<tr>'+
					                        '<td>线索反馈</td>'+
					                        '<td colspan="2">'+
					                            '<p>已处理&nbsp;&nbsp;'+pldt.yexs+'</p>'+
					                        '</td>'+
					                        '<td colspan="2">'+
					                            '<p>未处理&nbsp;&nbsp;'+pldt.noxs+'</p>'+
					                        '</td>'+
					                    '</tr>'+
					                    '<tr>'+
					                        '<td colspan="3">企业检查数</td>'+
					                        '<td colspan="4">'+
					                            '<p>'+pldt.qyjc+'</p>'+
					                        '</td>'+
					                    '</tr>'+
					                '</tbody>'+
					            '</table>';
				$(".message_inner .scole").html(police_msg);
    	    }
    	   
    	 });
 		
 		
 	}
 })
 
 
 function tubiao7_jian(data){
  	var data1 = [];
	for(x in data){
		data1.push({"name":x,"value":data[x]});
	}
  	return data1;
  }
function tubiao7(data){
	zdztshul_option = {
    tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
    },
    color:['#5b55ea', '#72e488','#7beff2','#ceee61'],  
    legend: {
        orient: 'vertical',
        left: 'left',
        data: ['实有','变更','注销'],
        textStyle:{    //图例文字的样式
        	color:'#fff',
    }
    },
    series : [
        {
            name: '单位状态数量',
            type: 'pie',
            radius : '55%',
            center: ['50%', '60%'],
            data:tubiao7_jian(data),
            itemStyle: {
                emphasis: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
            }
        }
    ]
};

// 使用刚指定的配置项和数据显示图表。
        zdztshul.setOption(zdztshul_option);
}

        
//行业类别数量统计
/*var hylbul = echarts.init(document.getElementById('hylbul'));
hylbul_fn("湖北省");
function hylbul_fn(name1,name2){
     	$.ajax({
    	 	type:"POST",
    	 	url:"{{url('admin/bigapi/gethylb')}}",
    	 	async:true,
    	 	data: {'name1':name1,'name2':name2, '_token':'{{csrf_token()}}'},
    	    dateType: 'json',
    	    success : function(data){
    	    	var obj = {};
    	        var obj = jQuery.parseJSON(data);
    	        tubiao8(obj.city[0])
    	           if(obj.city[0].length == 0){
    	        	hylbul.clear();
    	        }else{
	        	    tubiao8(obj.city[0])
    	        }
    	    }
    	   
    	 });
 }
  function tubiao8_jian(data){
  	var data1 = [];
	for(x in data){
		data1.push({"name":x,"value":data[x]});
	}
  	return data1;
  }
  function tubiao8_jian1(data){
  	var data1 = [];
	for(x in data){
		data1.push(x);
	}
  	return data1;
  }
function tubiao8(data){
	hylbul_option = {
    tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)",
       
    },
    legend: {
        orient: 'vertical',
        left: 'left',
//      data: tubiao8_jian1(data),
        textStyle:{    //图例文字的样式
        	color:'#fff'
    }
    },
    series : [
        {
            name: '行业类别数量',
            type: 'pie',
            radius : '55%',
            center: ['50%', '60%'],
            label:{
					normal:{
						show:false ,
						position : 'outside'
					},
						emphasis:{
						show :true
					}
				},
				
            data:tubiao8_jian(data),
            itemStyle: {
                emphasis: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
                
            }
        }
    ]
};
// 使用刚指定的配置项和数据显示图表。
        hylbul.setOption(hylbul_option);
}*/

        
//行业管控数量统计
/*var huizong = echarts.init(document.getElementById('huizong'));

huizong_fn('湖北省');
function huizong_fn(name1,name2){
     	$.ajax({
    	 	type:"POST",
    	 	url:"{{url('admin/bigapi/hygk')}}",
    	 	async:true,
    	 	data: {'name1':name1,'name2':name2, '_token':'{{csrf_token()}}'},
    	    dateType: 'json',
    	    success : function(data){
    	    	var obj = {};
    	        var obj = jQuery.parseJSON(data);
//  	         console.log(tubiao9_jian(obj));
	            if(obj == 0){
					 huizong.clear();
    	        }else{
	        	    tubiao9(obj);
    	        }
    	    }
    	   
    	 });
 }
  function tubiao9_jian(data){
  	var data1 = [];
	for(x in data){
		data1.push(data[x][0].value);
	}
  	return data1;
  }
function tubiao9(data){
	console.log(data)
	huizong_option = {
    color: ['#3398DB'],
    tooltip : {
        trigger: 'axis',
        axisPointer : {            // 坐标轴指示器，坐标轴触发有效
            type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
        }
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis : [
        {
            type : 'category',
            data : ['散装汽油系统', '快递系统', '长途客运系统','保安监管系统'],
            axisTick: {
                alignWithLabel: true
            },
             axisLabel: {
                        show: true,
                        textStyle: {
                            color: '#fff'
                        }
                    }
        }
    ],
    yAxis : [
        {
            type : 'value',
             axisLabel: {
                        show: true,
                        textStyle: {
                            color: '#fff'
                        }
                    }
        }
    ],
    series : [
        {
            name:'数量',
            type:'bar',
            barWidth: '20%',
            data:tubiao9_jian(data),
        }
    ]
};

// 使用刚指定的配置项和数据显示图表。
        huizong.setOption(huizong_option);
}*/




</script>


